#ifndef FILEOPERATOR_H
#define FILEOPERATOR_H

#include <QObject>
#include <QDir>
#include <QDebug>

class FileOperator : public QObject
{
    Q_OBJECT
public:
    explicit FileOperator(QObject *parent = nullptr);
    static FileOperator* GetInstance();
    Q_INVOKABLE bool creatDir(QString Path,QString DirName);
    Q_INVOKABLE bool creatFile(QString Path,QString DirName,QString format);
    Q_INVOKABLE bool writeFile(QString filePath,QString content);

    bool getDirIsExist(QString Path);
    bool getFileIsExist(QString fileName);

signals:

public slots:
private:
    static FileOperator * instance;
};

#endif // FILEOPERATOR_H
